package com.astar.service;

import com.astar.domain.UnifiedUserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by liuruiyan on 2019/8/25.
 */
public interface UserInfoService extends IService<UnifiedUserInfo>{


    /**
     * 根据unionId查询用户信息
     * @param unionId
     * @return
     */
    UnifiedUserInfo queryInfoByUnionId(String unionId);

    void insert(UnifiedUserInfo unifiedUserInfo);

    void update(UnifiedUserInfo unifiedUserInfo);

    /**
     * 更新指定列内容
     * @param userId
     * @param columnName
     * @param value
     */
    void updateByColumn(Integer userId,String columnName ,String value);

    /**
     * 根据unionId查询用户信息，如存在则直接返回，不存在则插入
     * @param unifiedUserInfo
     * @return
     */
    UnifiedUserInfo queryInfoAndSave(UnifiedUserInfo unifiedUserInfo);

}
